#pragma once
#include <stdio.h>
#include <assert.h>  
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <iostream>  
#include "leveldb/db.h"  
#include "leveldb/options.h"
#include "leveldb/cache.h"
using namespace std;
  
class CKvdb
{
public:
  CKvdb();
  ~CKvdb();
  int32_t init(const char* szName);
  int32_t Put(const char* szKey, const void* szValue, const size_t nValue);
  int32_t Get(const char* szKey, void* szValue, const size_t nValue);
  int32_t Delete(const char* szKey);

private:
	leveldb::DB* db;
	leveldb::Options options;
  leveldb::WriteOptions write_opt;
  leveldb::ReadOptions read_opt;
};  
